<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta charset="utf-8">
    <!-- <link rel="stylesheet" type="text/css" href="{$_G['URL']['YX2020_CSS']}css/reset.css"> -->

    <script src="https://css2020.yixuan.net/2020css/yx2020/js/jquery.js?v=2"></script>
    <link rel="stylesheet" type="text/css" href="https://css2020.yixuan.net/2020css/yx2020/css/reset.css">
    <link rel="stylesheet" type="text/css" href="https://css2020.yixuan.net/2020css/yx2020/css/swiper.min.css">

    <script src="https://css2020.yixuan.net/2020css/yx2020/js/swiper-3.4.2.min.js"></script>
    <!-- 以下：时间弹窗样式等 -->
    <link  rel="stylesheet" href="https://css2020.yixuan.net/2020css/beilai/css/index.css"/>
    <!-- 引入 Vue 和 Vant 的 JS 文件 -->
    <script src="https://css2020.yixuan.net/2020css/beilai/js/vue@next.js?v=1"></script>
    <script src="https://css2020.yixuan.net/2020css/beilai/js/vant.min.js?v=1"></script>
    <script src="{$_G['URL']['LOTTERY_CSS']}lottery/js/layer/layer.js"></script>

    <script>
        init();
        window.onresize = init;
        function init(){
            document.documentElement.style.fontSize =
                document.documentElement.clientWidth / 7.5 + 'px';
        }
    </script>
    <title>{$theme['title']}-{if $op=='display'}订单{else}课程{/if}核销</title>
    <style>
        .wrap{
            background: #f7f7f7;
            padding: 0.2rem 0.16rem 1.13rem;
            overflow: hidden;
        }
        .wrap .card{
            background: #ffffff;
            padding: 0 0.3rem;
            border-radius: 0.2rem;
            margin-bottom: 0.2rem;
        }
        .wrap .card .title{
            line-height: 0.8rem;
            font-size: 0.32rem;
            padding-left: 0.24rem;
            position: relative;
        }
        .wrap .card .title::after{
            content: "";
            display: block;
            position: absolute;
            width: 0.08rem;
            height: 0.31rem;
            background: linear-gradient(to bottom,#f94084,#fed5e4);
            top: 0;
            bottom: 0;
            margin: auto;
            left: 0.01rem;
            border-radius: 0.31rem;
        }
        .wrap .card .form_item{
            height: 0.96rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 0.01rem solid #f7f7f7;
        }
        .wrap .card .form_item:last-child{
            border-bottom: none;
        }
        .wrap .card .form_item span{
            color: #333333;
            font-size: 0.24rem;
        }
        .wrap .card .form_item input{
            border: none;
            text-align: right;
            color: #333333;
            font-size: 0.24rem;
        }
        .wrap .card .form_item input::-webkit-input-placeholder { /* Edge */
            color: #999999;
        }
        .wrap .card .form_item input:-ms-input-placeholder { /* Internet Explorer 10-11 */
            color: #999999;
        }
        .wrap .card .form_item input::placeholder {
            color: #999999;
        }
        .wrap .card .form_item select{
            color: #333333;
            border: none;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            padding-right: 0.3rem;
            outline: none;
            background: transparent;
        }
        .wrap .card  .select{
            position: relative;
        }
        .wrap .card .select::after,.wrap .card .select::before {
            width: 0;
            height: 0;
            border: 0.1rem solid transparent;
            border-top-color: #ffffff;
            position: absolute;
            content: "";
            right: 0;
            top: 0;
            bottom: 0;
            margin: auto;
        }
        .wrap .card .select::before{
            top: 0;
            right: 0;
            transform: translateY(0.02rem);
            border-top-color: #999999;
        }


        .wrap .card .form_item .item{
            display: flex;
            justify-content: center;
            align-items: center;
            margin-left: 0.28rem;
        }
        .wrap .card .form_item .radio_box{
            display: flex;
            justify-content: flex-end;
            align-items: center;
        }
        .wrap .card .form_item .radio_box .checkbox_img{
            width: 0.13rem;
            height: 0.09rem;
            display: none;
        }
        .wrap .card .form_item .radio_box .input{
            width: 0.27rem;
            height: 0.27rem;
            border-radius: 0.27rem;
            background: #f7f7f7;
            border: 0.01rem solid #eeeeee;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-right: 0.15rem;
        }
        .wrap .card .form_item input:checked+.input{
            background-image: linear-gradient(to top,#f8277a,#fe848d);
        }
        .wrap .card .form_item input:checked+.input .checkbox_img{
            display: block;
        }
        .wrap .card .form_item .radio_box input{
            display: none;
        }


        .wrap .card .li{
            display: flex;
            justify-content: flex-start;
            padding: 0.24rem 0.11rem;
            background: #ffffff;
            border-radius: 0.2rem;
            position: relative;
            border-bottom: 0.01rem solid #f7f7f7;
        }
        .wrap .card .li:last-child{
            border-bottom: none;
        }
        .wrap .card .li .head_img{
            width: 1.22rem;
            height: 1.22rem;
            border-radius: 0.14rem;
            flex-grow: 7;
        }
        .wrap .card .li .right{
            color: #999999;
            font-size: 0.24rem;
            padding-left: 0.4rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: flex-start;
        }
        .wrap .card .li .right .tit{
            width: 4.8rem;
            color: #333333;
            font-size: 0.28rem;
        }

        .wrap .card .li .right .data{
            display: flex;
            justify-content: flex-start;
            padding-top: 0.16rem;
            line-height: 0.42rem;
        }
        .wrap .card .li .right .data .d_left,.wrap .card .li .right .data .d_right{
            display: flex;
            flex-direction: column;
        }
        .wrap .card .li .right .data .d_left{
            padding-right: 0.3rem;
            position: relative;
        }
        .wrap .card .li .right .data .d_right{
            padding-left: 0.3rem;
        }
        .wrap .card .li .right .data .d_right .dr_t{
            font-size: 0.28rem;
            color: #f91d76;
        }
        .wrap .card .li .right .data .d_right .dr_b{
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .wrap .card .li .right .data .d_right .dr_b img{
            width: 0.21rem;
            height: 0.21rem;
            margin-right: 0.07rem;
        }
        .wrap .card .li .right .name{
            display: flex;
            justify-content: flex-start;
            align-items: center;
            margin-bottom: 0.1rem;
            margin-top: 0.1rem;
        }
        .wrap .card .li .right .name span{
            color: #5086ff;
            background: #ecf5ff;
            line-height: 0.32rem;
            padding: 0 0.08rem;
            font-size: 0.2rem;
            border-radius: 0.06rem;
        }
        .wrap .card .li .right .d_txt{
            color: #999999;
            font-size: 0.24rem;
            line-height: 0.38rem;
        }
        .wrap .card .li .right .d_txt span{
            font-size: 0.26rem;
            color: #f91d76;
        }

        .footer{
            position: fixed;
            bottom: 0;
            background: #ffffff;
            width: 7.5rem;
            left: 0;
            right: 0;
            box-shadow: 0 -0.1rem 0.2rem 0 rgba(200,200,200,0.5);
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 1.13rem;
            z-index: 2;
        }
        .footer .button{
            width: 6.25rem;
            height: 0.86rem;
            background:linear-gradient(to right,#f82079,#fe878e);
            color: #ffffff;
            font-size: 0.28rem;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-left: 0.64rem;
            border-radius: 0.2rem;
        }
        .footer .button .card_img{
            width: 0.34rem;
            height: 0.28rem;
            margin-right: 0.2rem;
        }
        .footer .button.over{
            background: #f3f3f3;
            color: #999999;
        }
        .footer .button.over .over_img{
            width: 0.3rem;
            height: 0.3rem;
            margin-right: 0.12rem;
        }
        .footer .left{
            display: flex;
            justify-content: flex-start;
            align-items: center;
            padding-left: 0.43rem;
        }
        .footer .left span{
            color: #999999;
            font-size: 0.28rem;
        }
        .footer .left .price{
            color: #f8337d;
        }
        .footer .left .money{
            width: 0.3rem;
            height: 0.3rem;
            margin-right: 0.14rem;
        }

        .van-popup{
            width: 6.56rem;
            height: 7.04rem;
            border-radius: 0.14rem;
            background: #FFFFFF;
        }
        .van-picker__toolbar{
            display: none;
        }
        .van-popup h5{

            font-size: 0.36rem;
            color: #333333;
            margin-top: 0.36rem;
            text-align: center;
        }
        .van-popup p{
            color: #666666;
            text-align: center;
            margin-top: 0.12rem;
            font-size: 0.26rem;
        }
        .van-picker__columns{

            background: #f6f6f6;
            margin: 0.36rem auto;
            border: 0.01rem solid #f2f2f2;

            width: 5.30rem;
            height: 2.62rem;
        }
        .van-picker-column__item{
        }
        .van-picker-column__item--selected{
            color: #8926a5;
            background: #ffffff;
        }

        .btn_wrap{
            border: 0.01rem solid #f1f1f1;
            width: 5.28rem;
            margin: 0 auto;
            height: 0.68rem;
            border-radius: 0.34rem;
            display: flex;
            justify-content: space-around;
            position: absolute;
            bottom: 1rem;
            left: 0;
            right: 0;
        }
        .btn_wrap .button{
            appearance: none;
            -ms-progress-appearance: none;
            background: none;
            font-size: 0.24rem;
            height: 0.68rem;
            line-height: 0.68rem;
            padding-top: 0;
            padding-bottom: 0;
            color: #666666;
            font-weight: bold;
        }
        .headSearch{
            margin-top: 0px;
        }
    </style>
</head>
<body style="overflow: visible!important;">
<div class="wrap">
    <div class="card">
        <div class="title">报名信息</div>
        <div class="form_item">
            <span>姓名</span>
            <input type="text" value="{$record_item['username']}" readonly>
        </div>
        <div class="form_item">
            <span>手机号</span>
            <input type="text" value="{$record_item['mobile']}" readonly>
        </div>
    </div>
    {if $op=='display'}
    <div class="card">
        <div class="title">选课信息</div>
        <div id="course_box">
                {loop $course_list $item}
                    <div class="li">
                        <img class="head_img" src="{$item['top_img']}">
                        <div class="right">
                            <div class="tit">{$item['name']}</div>
                            <div class="data">
                                <div class="d_left d_txt">
                                    <div>机构:<span>{$item['shangjianame']}</span></div>
                                    <div>选择校区:<span>{$item['address']}</span></div>
                                </div>
                            </div>
                        </div>
                    </div>
                {/loop}
        </div>
    </div>
    <div class="card">
        <div class="title">礼品信息</div>
        <div id="gift_box">
            {loop $gift_list $item}
            <label class="li">
                <img class="head_img" src="{$item['top_img']}" alt="">
                <div class="right">
                    <div class="tit">
                        {$item['name']}
                    </div>
                    <div class="data">
                        <div class="d_left d_txt">
                            <div>提供机构：<span>{$item['shangjainame']}</span></div>
                        </div>
                    </div>
                </div>
            </label>
            {/loop}
        </div>
    </div>
    {else}
        <div class="card">
            <div class="title">选课信息</div>
            <div id="course_box1">
                <div class="li">
                    <img class="head_img" src="{$has_verify['top_img']}">
                    <div class="right">
                        <div class="tit">{$has_verify['name']}</div>
                        <div class="data">
                            <div class="d_left d_txt">
                                <div>机构:<span>{$has_verify['shangjianame']}</span></div>
                                <div>选择校区:<span>{$has_verify['address']}</span></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    {/if}

    <div class="footer">
        {if $op=='display'}
        {if !$has_verify}
        <a class="button" href="{php echo $jump_url;}">
            <img src="{$_G['URL']['BEILAI_IMG']}/card.png" class="card_img">
            <span>立即核销</span>
        </a>
        {else}
        <div class="button" disabled="disabled" style="background: gray;">
            <span>{$has_verify['addtime']}-由 {$check_worker['username']} 核销</span>
        </div>
        {/if}
        {else}
            {if !$check_worker}
            <a class="button"  onclick="confirm()">
                <img src="{$_G['URL']['BEILAI_IMG']}/card.png" class="card_img">
                <span>立即核销</span>
            </a>
            {else}
            <div class="button" disabled="disabled" style="background: gray;">
                <span>{$has_verify['updated_at']}-由 {$check_worker['username']} 核销</span>
            </div>
            {/if}
        {/if}
    </div>
</div>
<script>

    function confirm(){
        let themeid = "{$themeid}";
        let flag_id = "{$has_verify['id']}";
        $.ajax({
            method:"POST",
            url:"/{php echo createMobileUrl('wx',array('from'=>'mobile','r'=>'beilai.index.Verify','op'=>'sure_verify'));}",
            data:{
                themeid:themeid,
                flag_id:flag_id
            },
            dataType:'json',
            success:function(res){
                if (res.error){
                    layer.msg(res.msg)
                }else{
                    layer.msg(res.msg);
                    window.location.reload();
                }
            }
        })
    }
</script>
{include file='beilai/tips'}
{include file='beilai/wxpay'}